package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.ims.data.entityenum.EnumFileType;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @email 526666031@qq.com
 * @detail 件表
 */
@Alias("AppFile")
@TableName(value = "app_file")
@ApiModel(value = "app文件表")
@Data
public class AppFile extends BaseModel<AppFile> implements Serializable {

    @ApiModelProperty(value = "主键")
    @TableId(value = "`app_file_id`", type = IdType.ASSIGN_UUID)
    private String appFileId;

    @ApiModelProperty(value = "公司名称")
    @TableField(value = "`file_md5`")
    private String fileMd5;

    @ApiModelProperty(value = "文件名称")
    @TableField(value = "`file_name`")
    private String fileName;

    @ApiModelProperty(value = "文件大小")
    @TableField(value = "`file_size`")
    private Long fileSize;

    @ApiModelProperty(value = "文件后缀")
    @TableField(value = "`file_suffix`")
    private String fileSuffix;

    @ApiModelProperty(value = "文件类型")
    @TableField(value = "`file_type`")
    private EnumFileType fileType;

    @ApiModelProperty(value = "父ID")
    @TableField(value = "`pid`")
    private String pid;

    @ApiModelProperty(value = "AppID")
    @TableField(value = "`app_id`")
    private String appId;

    @ApiModelProperty(value = "根ID")
    @TableField(value = "`root_id`")
    private String rootId;

    @ApiModelProperty(value = "等级")
    @TableField(value = "`lv`")
    private Integer lv;

    @ApiModelProperty(value = "存储路径")
    @TableField(value = "`store_path`")
    private String storePath;

    @ApiModelProperty(value = "是否完成上传")
    @TableField(value = "`is_finish_upload`")
    private Boolean isFinishUpload;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

}
